﻿<Window x:Class="RssReader.Window2"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window2" Height="709" Width="1712" 
    xmlns:local="clr-namespace:RssReader"    
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        mc:Ignorable="d" >
	<Window.Resources>
    
    <DataTemplate DataType="{x:Type local:Feed}">
      <StackPanel Orientation="Horizontal"> 
        <!--<Image Source="{Binding ImagePath}" MaxWidth="15" />--> 
        <TextBlock Text="{Binding Title}" FontWeight="Bold"></TextBlock>  
        <TextBlock Text="(1)" FontWeight="Bold" /> 
      </StackPanel>
      
      
    </DataTemplate>
    <DataTemplate DataType="{x:Type local:Post}"> 
      <StackPanel> 
        <TextBlock Text="{Binding Title}" TextWrapping="Wrap"/> 
        <TextBlock Text="{Binding DatePublished}" TextWrapping="Wrap"/> 
      </StackPanel>      
    </DataTemplate>
    <Storyboard x:Key="Storyboard1">
    	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="webBrowser" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
    		<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0.5"/>
    		<SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
    	</DoubleAnimationUsingKeyFrames>
    	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="webBrowser" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
    		<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0.5"/>
    		<SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
    	</DoubleAnimationUsingKeyFrames>
    </Storyboard>
    <Storyboard x:Key="OnMouseEnter1">
    	<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Visibility)">
    		<DiscreteObjectKeyFrame KeyTime="00:00:00.2000000" Value="{x:Static Visibility.Visible}"/>
    	</ObjectAnimationUsingKeyFrames>
    	<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path1" Storyboard.TargetProperty="(UIElement.Visibility)">
    		<DiscreteObjectKeyFrame KeyTime="00:00:00.2000000" Value="{x:Static Visibility.Visible}"/>
    	</ObjectAnimationUsingKeyFrames>
    	<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.Visibility)">
    		<DiscreteObjectKeyFrame KeyTime="00:00:00.2000000" Value="{x:Static Visibility.Visible}"/>
    	</ObjectAnimationUsingKeyFrames>
    </Storyboard>
  </Window.Resources>
	<Window.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
		</EventTrigger>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded"/>
		<EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="grid">
			<BeginStoryboard Storyboard="{StaticResource OnMouseEnter1}" x:Name="OnMouseEnter1_BeginStoryboard"/>
		</EventTrigger>
	</Window.Triggers>
    <Grid Height="645" Width="1672">
    	<Grid.RowDefinitions>
    		<RowDefinition Height="*"/>
    	</Grid.RowDefinitions>
    	<Grid.ColumnDefinitions>
    		<ColumnDefinition Width="Auto" MaxWidth="300"/>
    		<ColumnDefinition Width="0.339*"/>
    		<ColumnDefinition Width="0.612*"/>
    	</Grid.ColumnDefinitions>
    <Grid HorizontalAlignment="Stretch" Width="50" Visibility="Visible" x:Name="grid" Background="#00000000" Grid.Column="0" VerticalAlignment="Top" Height="50.12">
    	<Path Fill="#FFED3C3C" Stretch="Fill" Stroke="#FF000000" Margin="7,8,6.75,9.5" Data="M7,8 L42.25,39.5" StrokeThickness="3" Visibility="Collapsed" x:Name="path"/>
    	<Path Fill="#FFED3C3C" Stretch="Fill" Stroke="#FF000000" Margin="7.75,8,7.5,8.75" Data="M41.5,8 C41.5,8 7.75,40.25 7.75,40.25" StrokeThickness="3" Visibility="Collapsed" x:Name="path1"/>
    	<Border BorderThickness="2,2,2,2" BorderBrush="#FF000000" Visibility="Collapsed" x:Name="border"/>
    	<Border HorizontalAlignment="Left" Margin="-391.25,0,0,8.75" VerticalAlignment="Bottom" Width="2.5" Height="0.75"/>
    </Grid>
    <!-- <ComboBox ItemsSource="{Binding Path=Feeds}" SelectedItem="{Binding Path=SelectedFeed}" Margin="0,0,0,0" d:LayoutOverrides="Height" VerticalAlignment="Top" Grid.ColumnSpan="1"/>--> 
    <ListBox ItemsSource="{Binding Path=Feeds}" SelectedItem="{Binding Path=SelectedFeed}" 
             MinHeight="200" Grid.RowSpan="1" Height="Auto" VerticalAlignment="Stretch" 
             SelectionChanged="ListBox_SelectionChanged"/>
    <WebBrowser local:WebBrowserExtender.HTML="{Binding Path=SelectedFeed.Posts}" MinHeight="200" RenderTransformOrigin="0.5,0.5" x:Name="webBrowser" Grid.ColumnSpan="1" Grid.Column="2" Margin="0,0,0,0">
    	<WebBrowser.RenderTransform>
    		<TransformGroup>
    			<ScaleTransform ScaleX="1" ScaleY="1"/>
    			<SkewTransform AngleX="0" AngleY="0"/>
    			<RotateTransform Angle="0"/>
    			<TranslateTransform X="0" Y="0"/>
    		</TransformGroup>
    	</WebBrowser.RenderTransform>
    </WebBrowser>
    <FlowDocumentReader  Grid.Column="1" ViewingMode="Scroll" >
      <FlowDocument x:Name="feeds" />
    </FlowDocumentReader>
     
  </Grid>
</Window>
